# Copyright (c) Meta Platforms, Inc. and affiliates.

load("../../defs.bzl", "zs_binary", "zs_library", "zs_release_binary")

oncall("data_compression")

zs_binary(
    name = "bench_input_gen",
    srcs = [
        "tools/input_gen.cpp",
    ],
)

zs_library(
    name = "sao_graph",
    srcs = ["saoGraph.c"],
    headers = ["saoGraph.h"],
    deps = [
        "../..:zstronglib",
        "fbsource//third-party/benchmark:benchmark",
    ],
)

zs_binary(
    name = "unitBench",
    srcs = glob([
        "**/*.c",
    ]),
    headers = glob([
        "**/*.h",
    ]),
    deps = [
        "../..:zstronglib",
        "../../tools:fileio",
        "../../tools:timefn",
        "../../tools/streamdump:stream_dump2_headers",
        "fbsource//third-party/benchmark:benchmark",
        "fbsource//third-party/zstd:zstd",
        ":sao_graph",
    ],
)

zs_release_binary(
    name = "unitBench_mc",
    srcs = glob([
        "**/*.c",
    ]),
    headers = glob([
        "**/*.h",
    ]),
    deps = [
        "../..:zstronglib",
        "../../tools:fileio",
        "../../tools:timefn",
        "../../tools/streamdump:stream_dump2_headers",
        ":sao_graph",
        "//common/managed_compression/zstrong:stream_dump_shim",
    ],
)
